package cn.esale.dao.impl;

import java.util.List;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
import org.springframework.stereotype.Repository;

import cn.esale.dao.CusCustomerDao;
import cn.esale.entity.CusCustomer;

@Repository("cusCustomerDao")
public class CusCustomerDaoImpl extends HibernateDaoSupport implements CusCustomerDao {
	public CusCustomerDaoImpl(){}

	@Autowired
	public CusCustomerDaoImpl(@Qualifier("sessionFactory")SessionFactory sessionFactory){
		this.setSessionFactory(sessionFactory);
	}
	
	public List<CusCustomer> findAll() {
		// TODO Auto-generated method stub
		return this.getHibernateTemplate().find("from CusCustomer");
	}
}
